<template>
  <div>
    <Header :hasBorder="true" />
    <MovieDetail :mId="mId" :buy="true"/>
    <div class="container">
      <div class="main-content-container clearfix">
        <IntroVue />
        <TrailerVue :mId="mId" />
        <CommentVue :mId="mId" />
      </div>
    </div>
  </div>
</template>

<script>
import MovieDetail from '@/components/MovieDetail'
import Header from '@/components/Header'
import CommentVue from './Comment.vue'
import IntroVue from './Intro.vue'
import TrailerVue from './Trailer.vue'
export default {
  name: 'VueIndex',
  components: { MovieDetail, Header, CommentVue, IntroVue, TrailerVue },
  data () {
    return {}
  },

  mounted () {
    // console.log(this.$route.params.id)
  },
  computed: {
    // eslint-disable-next-line vue/return-in-computed-property
    mId () {
      if (this.$route.params.id) {
        return this.$route.params.id
      }
      if (this.$route.query.Id) {
        return this.$route.query.Id
      }
    }

  },

  methods: {}
}
</script>

<style lang="scss" scoped>
.container {
  width: 1200px;
  margin: 0 auto;
}
.main-content-container {
  margin-top: 80px;
}
.clearfix:after, .clearfix:before {
    content: " ";
    display: table;
}
</style>
